<?php

/**
 * SBWord - Class to hold the Word and its Respective ID
 * @version 1
 */
class SBWord {
    /** Aggregations: */
    /** Compositions: */
    /*     * * Attributes: ** */

    /**
     * ID of the Word
     * @access private
     */
    private $miID = 0;

    /**
     * Word String
     * @access private
     */
    private $mWord;

    public function getMiID() {
        return $this->miID;
    }

    public function getMWord() {
        return $this->mWord;
    }

    public function setMiID($miID) {
        $this->miID = $miID;
    }

    public function setMWord($mWord) {
        $this->mWord = $mWord;
    }
    
    /**
     * Return an isntance of this object with JUST the mWord variable initialized
     * @param type $inWord The Word string
     * @return \self
     */
    public static function withWord($inWord) {
        $instance = new self();
        $instance->setMWord($inWord);
        return $instance;
    }
    
    function __construct() { 
        
    }
    /**
     * 
     * @param type $inRow
     * @return \self
     */
    public static function withRow($inRow) {
        $instance = new self();
        $instance->setMiID($inRow["ID"]);
        $instance->setMWord($inRow["Word"]);
        return $instance;
    }
}
// end of SBWord